import request from '@/utils/request'

// 查询摆药列表 (分页)
export function selectPageDrugDispRecord(query) {
    return request({
        url: '/drug/drugDispRecord/selectPage',
        method: 'get',
        params: query
    })
}

// 查询摆药汇总列表 (分页)
export function getPatientDispRecord(query) {
    return request({
        url: '/drug/drugDispRecord/getPatientDispRecord',
        method: 'get',
        params: query
    })
}

// 查询摆药明细列表 (分页)
export function getPatientDisDispRecordDetail(query) {
    return request({
        url: '/drug/drugDispRecord/getPatientDisDispRecordDetail',
        method: 'get',
        params: query
    })
}

// 查询摆药列表 (不分页)
export function listDrugDispRecord(query) {
    return request({
        url: '/drug/drugDispRecord/list',
        method: 'get',
        params: query
    })
}

// 查询摆药详细
export function getDrugDispRecord(drugDispRecordId) {
    return request({
        url: '/drug/drugDispRecord/' + drugDispRecordId,
        method: 'get'
    })
}

// 新增摆药
export function addDrugDispRecord(data) {
    return request({
        url: '/drug/drugDispRecord',
        method: 'post',
        data: data
    })
}

// 修改摆药
export function updateDrugDispRecord(data) {
    return request({
        url: '/drug/drugDispRecord',
        method: 'put',
        data: data
    })
}

// 删除摆药
export function delDrugDispRecord(drugDispRecordId) {
    return request({
        url: '/drug/drugDispRecord/' + drugDispRecordId,
        method: 'delete'
    })
}
